﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="InputBreakDownKPIPage.aspx.cs" Inherits="FBKPI.Pages.InputBreakDownKPIPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {

            $("#<%=btn_save.ClientID%>").click(function () {

                var KpiID = $("#<%=hfKpiId.ClientID%>").val();
                var groupID = $("#<%=txt_childgroupid.ClientID%>").val();
                var categoryID = $("#<%=txt_childcategoryid.ClientID%>").val();
                var typeID = $("#<%=txt_childtypeid.ClientID%>").val();
                var subtypeID = $("#<%=txt_childsubtypeid.ClientID%>").val();
                var uomID = $("#<%=txt_childuomid.ClientID%>").val();
                var uomMaxID = $("#<%=txt_childuommaxid.ClientID%>").val();
                var uomMinID = $("#<%=txt_childuomminid.ClientID%>").val();
                var year = $("#<%=txt_childyear.ClientID%>").val();
                var weight = $("#<%=txt_childweight.ClientID%>").val();
                var periode = $("#<%=txt_childperiode.ClientID%>").val();
                var polarization = $("#<%=txt_childpolarization.ClientID%>").val();
                var description = $("#<%=txt_childdescription.ClientID%>").val();

                if (description == "") {
                    $.msgBox("Deskripsi KPI Child wajib di isi !", null, { title: "Pesan" });
                    return false;
                }

                var isactive = $("#<%=chk_childisactive.ClientID%>").is(":checked");
                var issummary = $("#<%=chk_childisummaryvalue.ClientID%>").is(":checked");

                var IsActive = "0";
                var IsSummaryValue = "0";

                if (isactive) {
                    IsActive = "1";
                }

                if (issummary) {
                    IsSummaryValue = "1";
                }


                var param = "?action=save";
                param = param + "&KpiID=" + KpiID;
                param = param + "&groupID=" + groupID;
                param = param + "&categoryID=" + categoryID;
                param = param + "&typeID=" + typeID;
                param = param + "&subtypeID=" + subtypeID;
                param = param + "&uomID=" + uomID;
                param = param + "&uomMaxID=" + uomMaxID;
                param = param + "&uomMinID=" + uomMinID;
                param = param + "&year=" + year;
                param = param + "&weight=" + weight;
                param = param + "&periode=" + periode;
                param = param + "&polarization=" + polarization;
                param = param + "&description=" + description;
                param = param + "&IsActive=" + IsActive;
                param = param + "&IsSummaryValue=" + IsSummaryValue;
                param = param + "&CurrUser=" + $("#txt_user").val();



                $.ajax({ url: '../ProcessRequest/' + "KPIBreakDownHandler.ashx" + param, type: "POST",
                    success: function (response) {
                        //alert(response);
                        $.msgBox(response, null, { title: "Pesan" });
                        if (response.indexOf('Success') > 0) {

                            document.location = "../Pages/KPIBreakDownPage.aspx"; //?User=" + $("#txt_user").val();
                        }
                        else
                            return false;
                    },
                    error: function (xhr, ajaxOptions, thrownError) {
                        //alert(xhr.responseText);
                        $.msgBox(xhr.responseText, null, { title: "Pesan Error" });
                    }
                });


                return false; //
            });

        });
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            mainmenu("#nav ul", "#nav li");
            mainmenu("#menu_wrap ul", "#menu_wrap li");

            $("#divBrowseUOM").hide();
            $("#divBrowseUOM").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowseUOMMax").hide();
            $("#divBrowseUOMMax").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowseUOMMin").hide();
            $("#divBrowseUOMMin").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowseKPIReplacement").hide();
            $("#divBrowseKPIReplacement").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });

            if ($("#MainContent_txt_childuom").val() == '') {
                $("#btn_BrowseUOMMax").attr("disabled", true);
                $("#btn_BrowseUOMMin").attr("disabled", true);
            }

            $("#txt_childreplacementdate").datepicker({ dateFormat: 'dd/mm/yy' })

            $("#btn_back").click(function () {
                document.location = "../Pages/KPIBreakDownPage.aspx?User=" + $("#txt_user").val();
                return false;
            });


            $("#btn_BrowseUOM").click(function () {
                $("#divBrowseUOM").dialog("option", "title", '<span class="header-text">Select Unit of Measure</span>');
                $("#divBrowseUOM").dialog("open");
                $('#uom').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/UoMSerializer.ashx",
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Description" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickUOM('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [3]
                        },
                        { "sClass": "center", "aTargets": [0, 2, 3] },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [2]
                        }
                    ]
                });

                //mark selected row
                $('body').on("click", '#uom tbody tr', function () {
                    $('#uom tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickUOM = function (UOMID, UOMDescription) {
                $("#MainContent_txt_childuom").val(UOMDescription);
                $("#MainContent_txt_childuomid").val(UOMID);
                $("#divBrowseUOM").dialog("close");
                $("#btn_BrowseUOMMax").attr("disabled", false);
                $("#btn_BrowseUOMMin").attr("disabled", false);
                $("#MainContent_txt_childuommax").val('');
                $("#MainContent_txt_childuommaxid").val('');
                $("#MainContent_txt_childuommin").val('');
                $("#MainContent_txt_childuomminid").val('');
            }



            $("#btn_BrowseUOMMax").click(function () {
                $("#divBrowseUOMMax").dialog("option", "title", '<span class="header-text">Select UoM Max</span>');
                $("#divBrowseUOMMax").dialog("open");
                $('#uommax').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/UoMDetailByUoMIDSerializer.ashx?UoM=" + $("#MainContent_txt_childuomid").val(),
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Description" },
                        { "mData": "ListValue" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickUOMMax('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [4]
                        },
                        { "sClass": "center", "aTargets": [0, 3, 4] },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [3]
                        }
                    ]
                });

                //mark selected row
                $('body').on("click", '#uommax tbody tr', function () {
                    $('#uommax tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickUOMMax = function (UOMID, UOMDescription) {
                $("#MainContent_txt_childuommax").val(UOMDescription);
                $("#MainContent_txt_childuommaxid").val(UOMID);
                $("#divBrowseUOMMax").dialog("close");
            }



            $("#btn_BrowseUOMMin").click(function () {
                $("#divBrowseUOMMin").dialog("option", "title", '<span class="header-text">Select UoM Min</span>');
                $("#divBrowseUOMMin").dialog("open");
                $('#uommin').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/UoMDetailByUoMIDSerializer.ashx?UoM=" + $("#MainContent_txt_childuomid").val(),
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Description" },
                        { "mData": "ListValue" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickUOMMin('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [4]
                        },
                        { "sClass": "center", "aTargets": [0, 3, 4] },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [3]
                        }
                    ]
                });

                //mark selected row
                $('body').on("click", '#uommin tbody tr', function () {
                    $('#uommin tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickUOMMin = function (UOMID, UOMDescription) {
                $("#MainContent_txt_childuommin").val(UOMDescription);
                $("#MainContent_txt_childuomminid").val(UOMID);
                $("#divBrowseUOMMin").dialog("close");
            }

            $("#btn_BrowseKPIReplacement").click(function () {
                $("#divBrowseKPIReplacement").dialog("option", "title", '<span class="header-text">Select KPI</span>');
                $("#divBrowseKPIReplacement").dialog("open");
                $('#kpireplacement').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/KPISerializer.ashx?User=" + $("#txt_user").val() + "&Year=",
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Description" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickKPIReplacement('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [3]
                        },
                        { "sClass": "center", "aTargets": [0, 2, 3] },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [2]
                        }
                    ]
                });

                //mark selected row
                $('body').on("click", '#kpireplacement tbody tr', function () {
                    $('#kpireplacement tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickKPIReplacement = function (KPIReplacementID, KPIReplacmentDescription) {
                $("#MainContent_txt_childkpireplacement").val(KPIReplacmentDescription);
                $("#MainContent_txt_childkpireplacementid").val(KPIReplacementID);
                $("#divBrowseKPIReplacement").dialog("close");
            }

            if ($("#MainContent_txt_uomenableflag").val() == 'False') {
                $("#btn_BrowseUOM").attr("disabled", true);
                $("#btn_BrowseUOMMax").attr("disabled", true);
                $("#btn_BrowseUOMMin").attr("disabled", true);
            }

            if ($("#MainContent_txt_weightenableflag").val() == 'False') {
                $("#MainContent_txt_childweight").attr("readonly", "readonly");
            }

        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form id="formInputaBreakDownKPI" action="KPIBreakdownPage.aspx">
    <div>
        <div class="customPageTitle">
            KPI Information</div>
        <br />
        <div class="customPageContent">
            <table width="100%">
                <tr>
                    <td width="50%">
                        <table>
                            <tr>
                                <td width="140px">
                                    Description
                                </td>
                                <td class="Separator">
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpidescription" TextMode="MultiLine" Rows="2" Width="400" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Group
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpigroup" Width="400" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Category
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpicategory" Width="400" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Type
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpitype" Width="400" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Sub Type
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpisubtype" Width="400" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Year
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpiyear" runat="server" ReadOnly="true"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Periode
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpiperiode" runat="server" ReadOnly="true"></asp:TextBox>
                                </td>
                            </tr>
                            
                        </table>
                    </td>
                    <td width="50%">
                        <table>
                            <tr>
                                <td style="padding-left:50px;">
                                    Polarization
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_polarization" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    Unit of Measure
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpiuom" runat="server" ReadOnly="true" class="longText"></asp:TextBox><input
                                        type="hidden" runat="server" id="txt_uomformat" />
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    UoM Max
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpiuommax" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    UoM Min
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_kpiuommin" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    Weight
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_weight" runat="server" ReadOnly="true"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td style="padding-left:50px;">
                                    Weight Enable Flag
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:CheckBox ID="chk_weightenableflag" runat="server" Enabled="false" />
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td style="padding-left:50px;">
                                    UoM Enable Flag
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:CheckBox ID="chk_uomenableflag" runat="server" Enabled="false" />
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    is Active
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:CheckBox ID="chk_active" runat="server" Enabled="false" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <br />
        <div class="customPageTitle">
            Set Sub KPI</div>
        <input type="hidden" id="txt_uomenableflag" runat="server" /><input type="hidden"
            id="txt_weightenableflag" runat="server" /><br />
        <div class="customPageContent">
            <table width="100%">
                <tr>
                    <td width="50%">
                        <table>
                            <tr runat="server" visible="false">
                                <td width="140px">
                                    ID
                                </td>
                                <td class="Separator">
                                    :
                                </td>
                                <td>
                                    <asp:TextBox  ID="txt_childkpiid" runat="server" ReadOnly="true" Text="0"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Description
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox Width="400" TextMode="MultiLine" Rows="2" ID="txt_childdescription" runat="server" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Group
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childgroup" Width="400" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                    <input type="hidden" runat="server" id="txt_childgroupid" />
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Category
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox Width="400" ID="txt_childcategory" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                    <input type="hidden" runat="server" id="txt_childcategoryid" />
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Type
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox Width="400" ID="txt_childtype" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                    <input type="hidden" runat="server" id="txt_childtypeid" />
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Sub Type
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox Width="400" ID="txt_childsubtype" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                    <input type="hidden" runat="server" id="txt_childsubtypeid" />
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Year
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childyear" runat="server" ReadOnly="true"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td width="140px">
                                    Periode
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childperiode" runat="server" ReadOnly="true"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td style="vertical-align: top">
                                    Detail Information
                                </td>
                                <td style="vertical-align: top">
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childdetailinformation" runat="server" TextMode="MultiLine"
                                        CssClass="MultilineTextbox"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="50%">
                        <table>
                            <tr>
                                <td style="padding-left:50px;">
                                    Unit of Measure
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childuom" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                    <button id="btn_BrowseUOM" class="ui-button ui-state-default">
                                        <span class="ui-button ui-icon ui-icon-newwin"></span>
                                    </button>
                                    <input type="hidden" runat="server" id="txt_childuomid" />
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    UoM Max
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childuommax" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                    <button id="btn_BrowseUOMMax" class="ui-button ui-state-default">
                                        <span class="ui-button ui-icon ui-icon-newwin"></span>
                                    </button>
                                    <input type="hidden" runat="server" id="txt_childuommaxid" />
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    UoM Min
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childuommin" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                    <button id="btn_BrowseUOMMin" class="ui-button ui-state-default">
                                        <span class="ui-button ui-icon ui-icon-newwin"></span>
                                    </button>
                                    <input type="hidden" runat="server" id="txt_childuomminid" />
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    Polarization
                                </td>
                                <td class="Separator">
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childpolarization" runat="server" ReadOnly="true"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td width="140px">
                                    Target Description
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childtargetdescription" runat="server" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td>
                                    Manual Calculation
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childmanualcalculation" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td>
                                    Calculation Type
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childcalculatuiontype" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    Weight
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childweight" runat="server" class="mandatory"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td>
                                    KPI Replacement
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childkpireplacement" runat="server" ReadOnly="true"></asp:TextBox>
                                    <button id="btn_BrowseKPIReplacement" class="ui-button ui-state-default">
                                        <span class="ui-button ui-icon ui-icon-newwin"></span>
                                    </button>
                                    <input type="hidden" runat="server" id="txt_childkpireplacementid" />
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td>
                                    Replacement Date
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childreplacementdate" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td>
                                    Replacement Desc.
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childreplacementdesc" runat="server" class="longText"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td style="padding-left:50px;">
                                    Weight Enable Flag
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:CheckBox ID="chk_childweightenableflag" runat="server" />
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td style="padding-left:50px;">
                                    UoM Enable Flag
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:CheckBox ID="chk_childuomenableflag" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    is Active
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:CheckBox ID="chk_childisactive" Checked="true" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left:50px;">
                                    is Summary Value
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:CheckBox ID="chk_childisummaryvalue"  runat="server" />
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td style="vertical-align: top">
                                    Strategic Objective
                                </td>
                                <td style="vertical-align: top">
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txt_childstrategicobjective" runat="server" TextMode="MultiLine"
                                        CssClass="MultilineTextbox"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <div id="divBrowseUOM" class="ui-widget-content padding5px ui-corner-all">
            <table cellpadding="0" cellspacing="0" border="0" class="display" id="uom">
                <thead>
                    <tr>
                        <th>
                            No
                        </th>
                        <th>
                            Description
                        </th>
                        <th>
                            is Active
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        <div id="divBrowseUOMMax" class="ui-widget-content padding5px ui-corner-all">
            <table cellpadding="0" cellspacing="0" border="0" class="display" id="uommax">
                <thead>
                    <tr>
                        <th>
                            No
                        </th>
                        <th>
                            Description
                        </th>
                        <th>
                            Value
                        </th>
                        <th>
                            is Active
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        <div id="divBrowseUOMMin" class="ui-widget-content padding5px ui-corner-all">
            <table cellpadding="0" cellspacing="0" border="0" class="display" id="uommin">
                <thead>
                    <tr>
                        <th>
                            No
                        </th>
                        <th>
                            Description
                        </th>
                        <th>
                            Value
                        </th>
                        <th>
                            is Active
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        <div id="divBrowseKPIReplacement" class="ui-widget-content padding5px ui-corner-all">
            <table cellpadding="0" cellspacing="0" border="0" class="display" id="kpireplacement">
                <thead>
                    <tr>
                        <th>
                            No
                        </th>
                        <th>
                            Description
                        </th>
                        <th>
                            is Active
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
        <br />
        <button id="btn_save" class="ui-button ui-corner-all ui-button ui-state-default ui-button-text-icon-primary"
            runat="server" name="btnSave" >  <%--onserverclick="SaveAction"--%>
            <span class="ui-button-icon-primary ui-icon ui-icon-check"></span>
            <label class="ui-button-text">
                Save</label>
        </button>
        <button id="btn_back" class="ui-button ui-corner-all ui-button ui-state-default ui-button-text-icon-primary">
            <span class="ui-button-icon-primary ui-icon ui-icon-arrowthick-1-w"></span>
            <label class="ui-button-text">
                Back</label>
        </button>
    </div>
    <asp:HiddenField ID="hfKpiId" runat="server" Value="0" />
    </form>
</asp:Content>
